Return the formatted error from log_and_500
, so the CLI can report it
#338
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
In the client API's
log_and_500
, return anErrorResponse
with a body derived from the error, rather than a bare 500 code.Note that this exposes previously-internal error messages to users.
The error messages newly reported by the CLI are not beautiful, but they at least describe the failure. Also, this PR does not improve the status codes returned; errors in e.g.
/database/publish
always return 500 (INTERNAL_SERVER_ERROR
), where they should often report more-specific errors, some of which put the client at fault rather than the server. Still, it's an improvement.Attempting to publish to a name you don't own:
Attempting to publish a database with incompatible schema changes without
-c
:API and ABI
If the API is breaking, please state below what will break